<!--
 * @Author: huangtianyang 916072572@qq.com
 * @Date: 2023-11-20 11:24:04
 * @LastEditors: huangtianyang
 * @LastEditTime: 2023-12-08 15:46:56
 * @FilePath: \cxl-driving-training\src\views\trainingGround\edit\Index.vue
-->
<template>
    <div class="page-box">
        <operationVue
            :title="
                (data.operation.type === 'look' ? '查看' : data.operation.type === 'edit' ? '编辑' : '新增') +
                '训练场（科目二）'
            "
            :detailedList="[]"
            :smallTitle="false"
            @cancel="data.onCancel"
            @save="data.onSave(formRef)"
            :disabled="data.operation.type === 'look' ? true : false"
        >
            <template #config>
                <formVue
                    :data="data.formData"
                    ref="formRef"
                    :disabled="data.operation.type === 'look' ? true : false"
                />
            </template>
        </operationVue>
    </div>
</template>
<script setup lang="ts">
import formVue from '@/components/form/Index.vue'
import operationVue from '@/components/Operation.vue'
import { reactive, ref } from 'vue'
import CoachOperation from '.'
const formRef = ref()

const data = reactive(new CoachOperation())
</script>
<style scoped lang="scss">
.up-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.tab-info {
    margin-bottom: 16px;
}
.title-h1 {
    font-size: 14px;
    margin-bottom: 16px;
}
.editor-tinymce {
    margin-bottom: 16px;
}
</style>
